<template>
  <div>
    <web-view
      src="https://agreement.ameimeika.com/sign_after_file/2019611_LFTAxTS4JKCM4yzG6Km4.pdf"
    ></web-view>
  </div>
</template>

<script>
import common from "@/assets/js/mmk_common.js";
export default {
  onLoad(options) {
    wx.setNavigationBarTitle({
      title: "补贴协议"
    });
    // common.mmk_Loading(2, "111");
    wx.downloadFile({
      url:
        "https://agreement.ameimeika.com/sign_after_file/2019611_LFTAxTS4JKCM4yzG6Km4.pdf",
      success: function(res) {
        // common.mmk_Loading(2, "222");
        var filePath = res.tempFilePath;
        console.log(res);
        wx.openDocument({
          filePath: filePath,
          success: function(res) {
            console.log("打开文档成功");
          },
          fail(res) {
            common.mmk_Loading(res);
          }
        });
      },
      fail(res) {
        common.mmk_Loading("下载失败" + res);
      }
    });
  },
  onShow() {}
};
</script>

<style lang="less" scoped>
</style>

